package com.sinbad.common.core.exception;

/**
 * @Description
 * @Author Jerry
 * @Date 2019/8/29 17:51
 **/

public class EMISException extends RuntimeException {
    private int code;
    private String message;

    public EMISException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public EMISException(CommonErrorCode commonErrorCode) {
        this.code = commonErrorCode.getCode();
        this.message = commonErrorCode.getMsg();
    }

    public EMISException(CommonErrorCode commonErrorCode, String message) {
        this.code = commonErrorCode.getCode();
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
